{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Working With Constants in Win32"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***\n",
    "Let's explore how to use Excel Constants in the Win32Com library. Now, like any previous tutorial let's create an instance of the Excel Application, make it visible & then add a workbook to the application instance. In this example, we will use **early binding** however late binding will also work.\n",
    "***"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Book4'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9.Workbook.Workbook"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# import libraries\n",
    "import win32com.client as win32\n",
    "\n",
    "# create the instance of Excel & make it the application visible.\n",
    "ExcelApp = win32.gencache.EnsureDispatch('Excel.Application')\n",
    "ExcelApp.Visible = True\n",
    "\n",
    "# add a workbook\n",
    "workbook = ExcelApp.Workbooks.Add()\n",
    "\n",
    "# let's print some information about our workbook.\n",
    "display(workbook.Name)\n",
    "display(type(workbook))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<div class=\"alert alert-block alert-info\">\n",
    "<b>Tip:</b> If you use early binding, Win32 remembers this going forward. This means is you use the regular dispatch method you it will run as early binding.\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Accessing Constants Directly\n",
    "\n",
    "***\n",
    "To access constants we need to **import the constants module** that belongs to the win32 library. We will use an alias \"c\" to reference this library. Now that we have this module we will access the ```__dict__``` component of it so we can access the list of constants. Now, the `__dict__` will return a list of constant libraries. Where each element of that list is a different Office application's constant library. **The library will only exist if we have used early binding to dispatch the object, otherwise the constant library will not exist.** Once, we access the particular constant library, we are reutrned another dictionary. We can access the values of this dictionary by passing through the name of the constant we want and it will return the enumeration for that constant.\n",
    "***"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'For the xlAbove constnat, the enumeration for it is 0'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "\"The type of Python object the constant dictionary is <class 'mappingproxy'>\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# import libraries\n",
    "from win32com.client import constants as c\n",
    "\n",
    "# to get a single xlConstant, we would just pass through the key which is the constant name.\n",
    "display(\"For the xlAbove constnat, the enumeration for it is \" + str(c.__dicts__[0]['xlAbove']))\n",
    "\n",
    "# this will display the type of python object the constant dictionary is. It returns a mappingproxy\n",
    "# which means it's a normal dictionary we can work with.\n",
    "display(\"The type of Python object the constant dictionary is \" + str(type(c.__dicts__[0])))\n",
    "\n",
    "# let's look at the entire dictionary.\n",
    "ConstantLib = c.__dicts__[0]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Working With Excel Constants - Example One\n",
    "\n",
    "***\n",
    "Let's add some borders to a range of cells. First, define the sheet and then a range of cells that belongs to that sheet. From here, we will add some values to those cells & then we will add our borders. **First thing is that we will define our border section & then the border style and store these in a variable each.** Next, we will call the range object, then the Borders property and pass through the bordertype first & then we will set the line style of that border and set it equal to borderStyle variable.\n",
    "***"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# get a worksheet\n",
    "worksheet = workbook.Worksheets(\"Sheet1\")\n",
    "\n",
    "# define a range & then set the values\n",
    "excRng = worksheet.Range(\"A1:C10\")\n",
    "excRng.Value = 1000\n",
    "\n",
    "# define the border components.\n",
    "borderType = c.xlEdgeBottom  #9\n",
    "borderStyle = c.xlContinuous #1\n",
    "\n",
    "# set the border & make it red.\n",
    "excRng.Borders(borderType).LineStyle = borderStyle\n",
    "excRng.Borders(borderType).ColorIndex = 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "ExcelApp = win32.dynamic.Dispatch(\"Excel.Application\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<div class=\"alert alert-block alert-info\">\n",
    "<b>Tip:</b> Late binding will also work for us.\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Working With Multiple Office Applications & Their Constants\n",
    "\n",
    "***\n",
    "In the above example, I assumed that we only wanted to work with the Excel Application. What if we wanted to work with other applications. Well lucky for us the logic is still the same, but I would like to elaborate a little bit more on the constants dictionary. Up above we were accessing the first item in our list. In this example I have to access the second item of my list. Why is it the second? Well it's because that was the second item I ran the ensure dispatch method on.\n",
    "***"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "mappingproxy({'__module__': 'win32com.gen_py.00020905-0000-0000-C000-000000000046x0x8x7',\n",
       "              'wdAlertsAll': -1,\n",
       "              'wdAlertsMessageBox': -2,\n",
       "              'wdAlertsNone': 0,\n",
       "              'wdCenter': 1,\n",
       "              'wdLeft': 0,\n",
       "              'wdRight': 2,\n",
       "              'wdIndent': 1,\n",
       "              'wdMargin': 0,\n",
       "              'wdAnimationBlinkingBackground': 2,\n",
       "              'wdAnimationLasVegasLights': 1,\n",
       "              'wdAnimationMarchingBlackAnts': 4,\n",
       "              'wdAnimationMarchingRedAnts': 5,\n",
       "              'wdAnimationNone': 0,\n",
       "              'wdAnimationShimmer': 6,\n",
       "              'wdAnimationSparkleText': 3,\n",
       "              'wdSessionStartSet': 1,\n",
       "              'wdTemplateSet': 2,\n",
       "              'wdBoth': 3,\n",
       "              'wdFinalYaa': 2,\n",
       "              'wdInitialAlef': 1,\n",
       "              'wdNone': 0,\n",
       "              'wdNumeralArabic': 0,\n",
       "              'wdNumeralContext': 2,\n",
       "              'wdNumeralHindi': 1,\n",
       "              'wdNumeralSystem': 3,\n",
       "              'wdIcons': 1,\n",
       "              'wdTiled': 0,\n",
       "              'wdAutoFitContent': 1,\n",
       "              'wdAutoFitFixed': 0,\n",
       "              'wdAutoFitWindow': 2,\n",
       "              'wdAutoClose': 3,\n",
       "              'wdAutoExec': 0,\n",
       "              'wdAutoExit': 4,\n",
       "              'wdAutoNew': 1,\n",
       "              'wdAutoOpen': 2,\n",
       "              'wdAutoSync': 5,\n",
       "              'wdAutoVersionOff': 0,\n",
       "              'wdAutoVersionOnClose': 1,\n",
       "              'wdBaselineAlignAuto': 4,\n",
       "              'wdBaselineAlignBaseline': 2,\n",
       "              'wdBaselineAlignCenter': 1,\n",
       "              'wdBaselineAlignFarEast50': 3,\n",
       "              'wdBaselineAlignTop': 0,\n",
       "              'wdSortByLocation': 1,\n",
       "              'wdSortByName': 0,\n",
       "              'wdBorderDistanceFromPageEdge': 1,\n",
       "              'wdBorderDistanceFromText': 0,\n",
       "              'wdBorderBottom': -3,\n",
       "              'wdBorderDiagonalDown': -7,\n",
       "              'wdBorderDiagonalUp': -8,\n",
       "              'wdBorderHorizontal': -5,\n",
       "              'wdBorderLeft': -2,\n",
       "              'wdBorderRight': -4,\n",
       "              'wdBorderTop': -1,\n",
       "              'wdBorderVertical': -6,\n",
       "              'emptyenum': 0,\n",
       "              'wdColumnBreak': 8,\n",
       "              'wdLineBreak': 6,\n",
       "              'wdLineBreakClearLeft': 9,\n",
       "              'wdLineBreakClearRight': 10,\n",
       "              'wdPageBreak': 7,\n",
       "              'wdSectionBreakContinuous': 3,\n",
       "              'wdSectionBreakEvenPage': 4,\n",
       "              'wdSectionBreakNextPage': 2,\n",
       "              'wdSectionBreakOddPage': 5,\n",
       "              'wdTextWrappingBreak': 11,\n",
       "              'wdBrowseComment': 3,\n",
       "              'wdBrowseEdit': 10,\n",
       "              'wdBrowseEndnote': 5,\n",
       "              'wdBrowseField': 6,\n",
       "              'wdBrowseFind': 11,\n",
       "              'wdBrowseFootnote': 4,\n",
       "              'wdBrowseGoTo': 12,\n",
       "              'wdBrowseGraphic': 8,\n",
       "              'wdBrowseHeading': 9,\n",
       "              'wdBrowsePage': 1,\n",
       "              'wdBrowseSection': 2,\n",
       "              'wdBrowseTable': 7,\n",
       "              'wdBrowserLevelMicrosoftInternetExplorer5': 1,\n",
       "              'wdBrowserLevelMicrosoftInternetExplorer6': 2,\n",
       "              'wdBrowserLevelV4': 0,\n",
       "              'wdTypeAutoText': 9,\n",
       "              'wdTypeBibliography': 34,\n",
       "              'wdTypeCoverPage': 2,\n",
       "              'wdTypeCustom1': 29,\n",
       "              'wdTypeCustom2': 30,\n",
       "              'wdTypeCustom3': 31,\n",
       "              'wdTypeCustom4': 32,\n",
       "              'wdTypeCustom5': 33,\n",
       "              'wdTypeCustomAutoText': 23,\n",
       "              'wdTypeCustomBibliography': 35,\n",
       "              'wdTypeCustomCoverPage': 16,\n",
       "              'wdTypeCustomEquations': 17,\n",
       "              'wdTypeCustomFooters': 18,\n",
       "              'wdTypeCustomHeaders': 19,\n",
       "              'wdTypeCustomPageNumber': 20,\n",
       "              'wdTypeCustomPageNumberBottom': 26,\n",
       "              'wdTypeCustomPageNumberPage': 27,\n",
       "              'wdTypeCustomPageNumberTop': 25,\n",
       "              'wdTypeCustomQuickParts': 15,\n",
       "              'wdTypeCustomTableOfContents': 28,\n",
       "              'wdTypeCustomTables': 21,\n",
       "              'wdTypeCustomTextBox': 24,\n",
       "              'wdTypeCustomWatermarks': 22,\n",
       "              'wdTypeEquations': 3,\n",
       "              'wdTypeFooters': 4,\n",
       "              'wdTypeHeaders': 5,\n",
       "              'wdTypePageNumber': 6,\n",
       "              'wdTypePageNumberBottom': 12,\n",
       "              'wdTypePageNumberPage': 13,\n",
       "              'wdTypePageNumberTop': 11,\n",
       "              'wdTypeQuickParts': 1,\n",
       "              'wdTypeTableOfContents': 14,\n",
       "              'wdTypeTables': 7,\n",
       "              'wdTypeTextBox': 10,\n",
       "              'wdTypeWatermarks': 8,\n",
       "              'wdPropertyAppName': 9,\n",
       "              'wdPropertyAuthor': 3,\n",
       "              'wdPropertyBytes': 22,\n",
       "              'wdPropertyCategory': 18,\n",
       "              'wdPropertyCharacters': 16,\n",
       "              'wdPropertyCharsWSpaces': 30,\n",
       "              'wdPropertyComments': 5,\n",
       "              'wdPropertyCompany': 21,\n",
       "              'wdPropertyFormat': 19,\n",
       "              'wdPropertyHiddenSlides': 27,\n",
       "              'wdPropertyHyperlinkBase': 29,\n",
       "              'wdPropertyKeywords': 4,\n",
       "              'wdPropertyLastAuthor': 7,\n",
       "              'wdPropertyLines': 23,\n",
       "              'wdPropertyMMClips': 28,\n",
       "              'wdPropertyManager': 20,\n",
       "              'wdPropertyNotes': 26,\n",
       "              'wdPropertyPages': 14,\n",
       "              'wdPropertyParas': 24,\n",
       "              'wdPropertyRevision': 8,\n",
       "              'wdPropertySecurity': 17,\n",
       "              'wdPropertySlides': 25,\n",
       "              'wdPropertySubject': 2,\n",
       "              'wdPropertyTemplate': 6,\n",
       "              'wdPropertyTimeCreated': 11,\n",
       "              'wdPropertyTimeLastPrinted': 10,\n",
       "              'wdPropertyTimeLastSaved': 12,\n",
       "              'wdPropertyTitle': 1,\n",
       "              'wdPropertyVBATotalEdit': 13,\n",
       "              'wdPropertyWords': 15,\n",
       "              'wdStyleBibliography': -266,\n",
       "              'wdStyleBlockQuotation': -85,\n",
       "              'wdStyleBodyText': -67,\n",
       "              'wdStyleBodyText2': -81,\n",
       "              'wdStyleBodyText3': -82,\n",
       "              'wdStyleBodyTextFirstIndent': -78,\n",
       "              'wdStyleBodyTextFirstIndent2': -79,\n",
       "              'wdStyleBodyTextIndent': -68,\n",
       "              'wdStyleBodyTextIndent2': -83,\n",
       "              'wdStyleBodyTextIndent3': -84,\n",
       "              'wdStyleBookTitle': -265,\n",
       "              'wdStyleCaption': -35,\n",
       "              'wdStyleClosing': -64,\n",
       "              'wdStyleCommentReference': -40,\n",
       "              'wdStyleCommentText': -31,\n",
       "              'wdStyleDate': -77,\n",
       "              'wdStyleDefaultParagraphFont': -66,\n",
       "              'wdStyleEmphasis': -89,\n",
       "              'wdStyleEndnoteReference': -43,\n",
       "              'wdStyleEndnoteText': -44,\n",
       "              'wdStyleEnvelopeAddress': -37,\n",
       "              'wdStyleEnvelopeReturn': -38,\n",
       "              'wdStyleFooter': -33,\n",
       "              'wdStyleFootnoteReference': -39,\n",
       "              'wdStyleFootnoteText': -30,\n",
       "              'wdStyleHeader': -32,\n",
       "              'wdStyleHeading1': -2,\n",
       "              'wdStyleHeading2': -3,\n",
       "              'wdStyleHeading3': -4,\n",
       "              'wdStyleHeading4': -5,\n",
       "              'wdStyleHeading5': -6,\n",
       "              'wdStyleHeading6': -7,\n",
       "              'wdStyleHeading7': -8,\n",
       "              'wdStyleHeading8': -9,\n",
       "              'wdStyleHeading9': -10,\n",
       "              'wdStyleHtmlAcronym': -96,\n",
       "              'wdStyleHtmlAddress': -97,\n",
       "              'wdStyleHtmlCite': -98,\n",
       "              'wdStyleHtmlCode': -99,\n",
       "              'wdStyleHtmlDfn': -100,\n",
       "              'wdStyleHtmlKbd': -101,\n",
       "              'wdStyleHtmlNormal': -95,\n",
       "              'wdStyleHtmlPre': -102,\n",
       "              'wdStyleHtmlSamp': -103,\n",
       "              'wdStyleHtmlTt': -104,\n",
       "              'wdStyleHtmlVar': -105,\n",
       "              'wdStyleHyperlink': -86,\n",
       "              'wdStyleHyperlinkFollowed': -87,\n",
       "              'wdStyleIndex1': -11,\n",
       "              'wdStyleIndex2': -12,\n",
       "              'wdStyleIndex3': -13,\n",
       "              'wdStyleIndex4': -14,\n",
       "              'wdStyleIndex5': -15,\n",
       "              'wdStyleIndex6': -16,\n",
       "              'wdStyleIndex7': -17,\n",
       "              'wdStyleIndex8': -18,\n",
       "              'wdStyleIndex9': -19,\n",
       "              'wdStyleIndexHeading': -34,\n",
       "              'wdStyleIntenseEmphasis': -262,\n",
       "              'wdStyleIntenseQuote': -182,\n",
       "              'wdStyleIntenseReference': -264,\n",
       "              'wdStyleLineNumber': -41,\n",
       "              'wdStyleList': -48,\n",
       "              'wdStyleList2': -51,\n",
       "              'wdStyleList3': -52,\n",
       "              'wdStyleList4': -53,\n",
       "              'wdStyleList5': -54,\n",
       "              'wdStyleListBullet': -49,\n",
       "              'wdStyleListBullet2': -55,\n",
       "              'wdStyleListBullet3': -56,\n",
       "              'wdStyleListBullet4': -57,\n",
       "              'wdStyleListBullet5': -58,\n",
       "              'wdStyleListContinue': -69,\n",
       "              'wdStyleListContinue2': -70,\n",
       "              'wdStyleListContinue3': -71,\n",
       "              'wdStyleListContinue4': -72,\n",
       "              'wdStyleListContinue5': -73,\n",
       "              'wdStyleListNumber': -50,\n",
       "              'wdStyleListNumber2': -59,\n",
       "              'wdStyleListNumber3': -60,\n",
       "              'wdStyleListNumber4': -61,\n",
       "              'wdStyleListNumber5': -62,\n",
       "              'wdStyleListParagraph': -180,\n",
       "              'wdStyleMacroText': -46,\n",
       "              'wdStyleMessageHeader': -74,\n",
       "              'wdStyleNavPane': -90,\n",
       "              'wdStyleNormal': -1,\n",
       "              'wdStyleNormalIndent': -29,\n",
       "              'wdStyleNormalObject': -158,\n",
       "              'wdStyleNormalTable': -106,\n",
       "              'wdStyleNoteHeading': -80,\n",
       "              'wdStylePageNumber': -42,\n",
       "              'wdStylePlainText': -91,\n",
       "              'wdStyleQuote': -181,\n",
       "              'wdStyleSalutation': -76,\n",
       "              'wdStyleSignature': -65,\n",
       "              'wdStyleStrong': -88,\n",
       "              'wdStyleSubtitle': -75,\n",
       "              'wdStyleSubtleEmphasis': -261,\n",
       "              'wdStyleSubtleReference': -263,\n",
       "              'wdStyleTOAHeading': -47,\n",
       "              'wdStyleTOC1': -20,\n",
       "              'wdStyleTOC2': -21,\n",
       "              'wdStyleTOC3': -22,\n",
       "              'wdStyleTOC4': -23,\n",
       "              'wdStyleTOC5': -24,\n",
       "              'wdStyleTOC6': -25,\n",
       "              'wdStyleTOC7': -26,\n",
       "              'wdStyleTOC8': -27,\n",
       "              'wdStyleTOC9': -28,\n",
       "              'wdStyleTableColorfulGrid': -172,\n",
       "              'wdStyleTableColorfulList': -171,\n",
       "              'wdStyleTableColorfulShading': -170,\n",
       "              'wdStyleTableDarkList': -169,\n",
       "              'wdStyleTableLightGrid': -161,\n",
       "              'wdStyleTableLightGridAccent1': -175,\n",
       "              'wdStyleTableLightList': -160,\n",
       "              'wdStyleTableLightListAccent1': -174,\n",
       "              'wdStyleTableLightShading': -159,\n",
       "              'wdStyleTableLightShadingAccent1': -173,\n",
       "              'wdStyleTableMediumGrid1': -166,\n",
       "              'wdStyleTableMediumGrid2': -167,\n",
       "              'wdStyleTableMediumGrid3': -168,\n",
       "              'wdStyleTableMediumList1': -164,\n",
       "              'wdStyleTableMediumList1Accent1': -178,\n",
       "              'wdStyleTableMediumList2': -165,\n",
       "              'wdStyleTableMediumShading1': -162,\n",
       "              'wdStyleTableMediumShading1Accent1': -176,\n",
       "              'wdStyleTableMediumShading2': -163,\n",
       "              'wdStyleTableMediumShading2Accent1': -177,\n",
       "              'wdStyleTableOfAuthorities': -45,\n",
       "              'wdStyleTableOfFigures': -36,\n",
       "              'wdStyleTitle': -63,\n",
       "              'wdStyleTocHeading': -267,\n",
       "              'wdCalendarArabic': 1,\n",
       "              'wdCalendarHebrew': 2,\n",
       "              'wdCalendarJapan': 4,\n",
       "              'wdCalendarKorean': 6,\n",
       "              'wdCalendarSakaEra': 7,\n",
       "              'wdCalendarTaiwan': 3,\n",
       "              'wdCalendarThai': 5,\n",
       "              'wdCalendarTranslitEnglish': 8,\n",
       "              'wdCalendarTranslitFrench': 9,\n",
       "              'wdCalendarUmalqura': 13,\n",
       "              'wdCalendarWestern': 0,\n",
       "              'wdCalendarTypeBidi': 99,\n",
       "              'wdCalendarTypeGregorian': 100,\n",
       "              'wdCaptionEquation': -3,\n",
       "              'wdCaptionFigure': -1,\n",
       "              'wdCaptionTable': -2,\n",
       "              'wdCaptionNumberStyleArabic': 0,\n",
       "              'wdCaptionNumberStyleArabicFullWidth': 14,\n",
       "              'wdCaptionNumberStyleArabicLetter1': 46,\n",
       "              'wdCaptionNumberStyleArabicLetter2': 48,\n",
       "              'wdCaptionNumberStyleChosung': 25,\n",
       "              'wdCaptionNumberStyleGanada': 24,\n",
       "              'wdCaptionNumberStyleHanjaRead': 41,\n",
       "              'wdCaptionNumberStyleHanjaReadDigit': 42,\n",
       "              'wdCaptionNumberStyleHebrewLetter1': 45,\n",
       "              'wdCaptionNumberStyleHebrewLetter2': 47,\n",
       "              'wdCaptionNumberStyleHindiArabic': 51,\n",
       "              'wdCaptionNumberStyleHindiCardinalText': 52,\n",
       "              'wdCaptionNumberStyleHindiLetter1': 49,\n",
       "              'wdCaptionNumberStyleHindiLetter2': 50,\n",
       "              'wdCaptionNumberStyleKanji': 10,\n",
       "              'wdCaptionNumberStyleKanjiDigit': 11,\n",
       "              'wdCaptionNumberStyleKanjiTraditional': 16,\n",
       "              'wdCaptionNumberStyleLowercaseLetter': 4,\n",
       "              'wdCaptionNumberStyleLowercaseRoman': 2,\n",
       "              'wdCaptionNumberStyleNumberInCircle': 18,\n",
       "              'wdCaptionNumberStyleSimpChinNum2': 38,\n",
       "              'wdCaptionNumberStyleSimpChinNum3': 39,\n",
       "              'wdCaptionNumberStyleThaiArabic': 54,\n",
       "              'wdCaptionNumberStyleThaiCardinalText': 55,\n",
       "              'wdCaptionNumberStyleThaiLetter': 53,\n",
       "              'wdCaptionNumberStyleTradChinNum2': 34,\n",
       "              'wdCaptionNumberStyleTradChinNum3': 35,\n",
       "              'wdCaptionNumberStyleUppercaseLetter': 3,\n",
       "              'wdCaptionNumberStyleUppercaseRoman': 1,\n",
       "              'wdCaptionNumberStyleVietCardinalText': 56,\n",
       "              'wdCaptionNumberStyleZodiac1': 30,\n",
       "              'wdCaptionNumberStyleZodiac2': 31,\n",
       "              'wdCaptionPositionAbove': 0,\n",
       "              'wdCaptionPositionBelow': 1,\n",
       "              'wdCellColorByAuthor': -1,\n",
       "              'wdCellColorLightBlue': 2,\n",
       "              'wdCellColorLightGray': 7,\n",
       "              'wdCellColorLightGreen': 6,\n",
       "              'wdCellColorLightOrange': 5,\n",
       "              'wdCellColorLightPurple': 4,\n",
       "              'wdCellColorLightYellow': 3,\n",
       "              'wdCellColorNoHighlight': 0,\n",
       "              'wdCellColorPink': 1,\n",
       "              'wdCellAlignVerticalBottom': 3,\n",
       "              'wdCellAlignVerticalCenter': 1,\n",
       "              'wdCellAlignVerticalTop': 0,\n",
       "              'wdFullWidth': 7,\n",
       "              'wdHalfWidth': 6,\n",
       "              'wdHiragana': 9,\n",
       "              'wdKatakana': 8,\n",
       "              'wdLowerCase': 0,\n",
       "              'wdNextCase': -1,\n",
       "              'wdTitleSentence': 4,\n",
       "              'wdTitleWord': 2,\n",
       "              'wdToggleCase': 5,\n",
       "              'wdUpperCase': 1,\n",
       "              'wdWidthFullWidth': 7,\n",
       "              'wdWidthHalfWidth': 6,\n",
       "              'wdCheckInMajorVersion': 1,\n",
       "              'wdCheckInMinorVersion': 0,\n",
       "              'wdCheckInOverwriteVersion': 2,\n",
       "              'wdAlwaysConvert': 1,\n",
       "              'wdAskToConvert': 3,\n",
       "              'wdAskToNotConvert': 2,\n",
       "              'wdNeverConvert': 0,\n",
       "              'wdCollapseEnd': 0,\n",
       "              'wdCollapseStart': 1,\n",
       "              'wdColorAqua': 13421619,\n",
       "              'wdColorAutomatic': -16777216,\n",
       "              'wdColorBlack': 0,\n",
       "              'wdColorBlue': 16711680,\n",
       "              'wdColorBlueGray': 10053222,\n",
       "              'wdColorBrightGreen': 65280,\n",
       "              'wdColorBrown': 13209,\n",
       "              'wdColorDarkBlue': 8388608,\n",
       "              'wdColorDarkGreen': 13056,\n",
       "              'wdColorDarkRed': 128,\n",
       "              'wdColorDarkTeal': 6697728,\n",
       "              'wdColorDarkYellow': 32896,\n",
       "              'wdColorGold': 52479,\n",
       "              'wdColorGray05': 15987699,\n",
       "              'wdColorGray10': 15132390,\n",
       "              'wdColorGray125': 14737632,\n",
       "              'wdColorGray15': 14277081,\n",
       "              'wdColorGray20': 13421772,\n",
       "              'wdColorGray25': 12632256,\n",
       "              'wdColorGray30': 11776947,\n",
       "              'wdColorGray35': 10921638,\n",
       "              'wdColorGray375': 10526880,\n",
       "              'wdColorGray40': 10066329,\n",
       "              'wdColorGray45': 9211020,\n",
       "              'wdColorGray50': 8421504,\n",
       "              'wdColorGray55': 7566195,\n",
       "              'wdColorGray60': 6710886,\n",
       "              'wdColorGray625': 6316128,\n",
       "              'wdColorGray65': 5855577,\n",
       "              'wdColorGray70': 5000268,\n",
       "              'wdColorGray75': 4210752,\n",
       "              'wdColorGray80': 3355443,\n",
       "              'wdColorGray85': 2500134,\n",
       "              'wdColorGray875': 2105376,\n",
       "              'wdColorGray90': 1644825,\n",
       "              'wdColorGray95': 789516,\n",
       "              'wdColorGreen': 32768,\n",
       "              'wdColorIndigo': 10040115,\n",
       "              'wdColorLavender': 16751052,\n",
       "              'wdColorLightBlue': 16737843,\n",
       "              'wdColorLightGreen': 13434828,\n",
       "              'wdColorLightOrange': 39423,\n",
       "              'wdColorLightTurquoise': 16777164,\n",
       "              'wdColorLightYellow': 10092543,\n",
       "              'wdColorLime': 52377,\n",
       "              'wdColorOliveGreen': 13107,\n",
       "              'wdColorOrange': 26367,\n",
       "              'wdColorPaleBlue': 16764057,\n",
       "              'wdColorPink': 16711935,\n",
       "              'wdColorPlum': 6697881,\n",
       "              'wdColorRed': 255,\n",
       "              'wdColorRose': 13408767,\n",
       "              'wdColorSeaGreen': 6723891,\n",
       "              'wdColorSkyBlue': 16763904,\n",
       "              'wdColorTan': 10079487,\n",
       "              'wdColorTeal': 8421376,\n",
       "              'wdColorTurquoise': 16776960,\n",
       "              'wdColorViolet': 8388736,\n",
       "              'wdColorWhite': 16777215,\n",
       "              'wdColorYellow': 65535,\n",
       "              'wdAuto': 0,\n",
       "              'wdBlack': 1,\n",
       "              'wdBlue': 2,\n",
       "              'wdBrightGreen': 4,\n",
       "              'wdByAuthor': -1,\n",
       "              'wdClassicBlue': 18,\n",
       "              'wdClassicRed': 17,\n",
       "              'wdDarkBlue': 9,\n",
       "              'wdDarkRed': 13,\n",
       "              'wdDarkYellow': 14,\n",
       "              'wdGray25': 16,\n",
       "              'wdGray50': 15,\n",
       "              'wdGreen': 11,\n",
       "              'wdNoHighlight': 0,\n",
       "              'wdPink': 5,\n",
       "              'wdRed': 6,\n",
       "              'wdTeal': 10,\n",
       "              'wdTurquoise': 3,\n",
       "              'wdViolet': 12,\n",
       "              'wdWhite': 8,\n",
       "              'wdYellow': 7,\n",
       "              'wdColumnWidthDefault': 2,\n",
       "              'wdColumnWidthNarrow': 1,\n",
       "              'wdColumnWidthWide': 3,\n",
       "              'wdCompareDestinationNew': 2,\n",
       "              'wdCompareDestinationOriginal': 0,\n",
       "              'wdCompareDestinationRevised': 1,\n",
       "              'wdCompareTargetCurrent': 1,\n",
       "              'wdCompareTargetNew': 2,\n",
       "              'wdCompareTargetSelected': 0,\n",
       "              'wdAlignTablesRowByRow': 39,\n",
       "              'wdAllowHyphenationAtTrackBottom': 71,\n",
       "              'wdAllowSpaceOfSameStyleInTable': 54,\n",
       "              'wdApplyBreakingRules': 46,\n",
       "              'wdAutofitLikeWW11': 57,\n",
       "              'wdAutospaceLikeWW7': 38,\n",
       "              'wdCachedColBalance': 65,\n",
       "              'wdConvMailMergeEsc': 6,\n",
       "              'wdDelayableFloatingTable': 70,\n",
       "              'wdDisableOTKerning': 66,\n",
       "              'wdDontAdjustLineHeightInTable': 36,\n",
       "              'wdDontAutofitConstrainedTables': 56,\n",
       "              'wdDontBalanceSingleByteDoubleByteWidth': 16,\n",
       "              'wdDontBreakConstrainedForcedTables': 62,\n",
       "              'wdDontBreakWrappedTables': 43,\n",
       "              'wdDontOverrideTableStyleFontSzAndJustification': 68,\n",
       "              'wdDontSnapTextToGridInTableWithObjects': 44,\n",
       "              'wdDontULTrailSpace': 15,\n",
       "              'wdDontUseAsianBreakRulesInGrid': 48,\n",
       "              'wdDontUseHTMLParagraphAutoSpacing': 35,\n",
       "              'wdDontUseIndentAsNumberingTabStop': 52,\n",
       "              'wdDontVertAlignCellWithShape': 61,\n",
       "              'wdDontVertAlignInTextbox': 63,\n",
       "              'wdDontWrapTextWithPunctuation': 47,\n",
       "              'wdExactOnTop': 28,\n",
       "              'wdExpandShiftReturn': 14,\n",
       "              'wdFELineBreak11': 53,\n",
       "              'wdFlipMirrorIndents': 67,\n",
       "              'wdFootnoteLayoutLikeWW8': 34,\n",
       "              'wdForgetLastTabAlignment': 37,\n",
       "              'wdGrowAutofit': 50,\n",
       "              'wdHangulWidthLikeWW11': 59,\n",
       "              'wdLayoutRawTableWidth': 40,\n",
       "              'wdLayoutTableRowsApart': 41,\n",
       "              'wdLeaveBackslashAlone': 13,\n",
       "              'wdLineWrapLikeWord6': 32,\n",
       "              'wdMWSmallCaps': 22,\n",
       "              'wdNoColumnBalance': 5,\n",
       "              'wdNoExtraLineSpacing': 23,\n",
       "              'wdNoLeading': 20,\n",
       "              'wdNoSpaceForUL': 21,\n",
       "              'wdNoSpaceRaiseLower': 2,\n",
       "              'wdNoTabHangIndent': 1,\n",
       "              'wdOrigWordTableRules': 9,\n",
       "              'wdPrintBodyTextBeforeHeader': 19,\n",
       "              'wdPrintColBlack': 3,\n",
       "              'wdSelectFieldWithFirstOrLastCharacter': 45,\n",
       "              'wdShapeLayoutLikeWW8': 33,\n",
       "              'wdShowBreaksInFrames': 11,\n",
       "              'wdSpacingInWholePoints': 18,\n",
       "              'wdSplitPgBreakAndParaMark': 60,\n",
       "              'wdSubFontBySize': 25,\n",
       "              'wdSuppressBottomSpacing': 29,\n",
       "              'wdSuppressSpBfAfterPgBrk': 7,\n",
       "              'wdSuppressTopSpacing': 8,\n",
       "              'wdSuppressTopSpacingMac5': 17,\n",
       "              'wdSwapBordersFacingPages': 12,\n",
       "              'wdTransparentMetafiles': 10,\n",
       "              'wdTruncateFontHeight': 24,\n",
       "              'wdUnderlineTabInNumList': 58,\n",
       "              'wdUseNormalStyleForList': 51,\n",
       "              'wdUsePre2018iOSMacLayout': 73,\n",
       "              'wdUsePrinterMetrics': 26,\n",
       "              'wdUseWord2002TableStyleRules': 49,\n",
       "              'wdUseWord2010TableStyleRules': 69,\n",
       "              'wdUseWord2013TrackBottomHyphenation': 72,\n",
       "              'wdUseWord97LineBreakingRules': 42,\n",
       "              'wdWPJustification': 31,\n",
       "              'wdWPSpaceWidth': 30,\n",
       "              'wdWW11IndentRules': 55,\n",
       "              'wdWW6BorderRules': 27,\n",
       "              'wdWord11KerningPairs': 64,\n",
       "              'wdWrapTrailSpaces': 4,\n",
       "              'wdCurrent': 65535,\n",
       "              'wdWord2003': 11,\n",
       "              'wdWord2007': 12,\n",
       "              'wdWord2010': 14,\n",
       "              'wdWord2013': 15,\n",
       "              'wdEvenColumnBanding': 7,\n",
       "              'wdEvenRowBanding': 3,\n",
       "              'wdFirstColumn': 4,\n",
       "              'wdFirstRow': 0,\n",
       "              'wdLastColumn': 5,\n",
       "              'wdLastRow': 1,\n",
       "              'wdNECell': 8,\n",
       "              'wdNWCell': 9,\n",
       "              'wdOddColumnBanding': 6,\n",
       "              'wdOddRowBanding': 2,\n",
       "              'wdSECell': 10,\n",
       "              'wdSWCell': 11,\n",
       "              'wdAutoPosition': 0,\n",
       "              'wdBackward': -1073741823,\n",
       "              'wdCreatorCode': 1297307460,\n",
       "              'wdFirst': 1,\n",
       "              'wdForward': 1073741823,\n",
       "              'wdToggle': 9999998,\n",
       "              'wdUndefined': 9999999,\n",
       "              'wdContentControlBoundingBox': 0,\n",
       "              'wdContentControlHidden': 2,\n",
       "              'wdContentControlTags': 1,\n",
       "              'wdContentControlDateStorageDate': 1,\n",
       "              'wdContentControlDateStorageDateTime': 2,\n",
       "              'wdContentControlDateStorageText': 0,\n",
       "              'wdContentControlLevelCell': 3,\n",
       "              'wdContentControlLevelInline': 0,\n",
       "              'wdContentControlLevelParagraph': 1,\n",
       "              'wdContentControlLevelRow': 2,\n",
       "              'wdContentControlBuildingBlockGallery': 5,\n",
       "              'wdContentControlCheckBox': 8,\n",
       "              'wdContentControlComboBox': 3,\n",
       "              'wdContentControlDate': 6,\n",
       "              'wdContentControlDropdownList': 4,\n",
       "              'wdContentControlGroup': 7,\n",
       "              'wdContentControlPicture': 2,\n",
       "              'wdContentControlRepeatingSection': 9,\n",
       "              'wdContentControlRichText': 0,\n",
       "              'wdContentControlText': 1,\n",
       "              'wdContinueDisabled': 0,\n",
       "              'wdContinueList': 2,\n",
       "              'wdResetList': 1,\n",
       "              'wdArgentina': 54,\n",
       "              'wdBrazil': 55,\n",
       "              'wdCanada': 2,\n",
       "              'wdChile': 56,\n",
       "              'wdChina': 86,\n",
       "              'wdDenmark': 45,\n",
       "              'wdFinland': 358,\n",
       "              'wdFrance': 33,\n",
       "              'wdGermany': 49,\n",
       "              'wdIceland': 354,\n",
       "              'wdItaly': 39,\n",
       "              'wdJapan': 81,\n",
       "              'wdKorea': 82,\n",
       "              'wdLatinAmerica': 3,\n",
       "              'wdMexico': 52,\n",
       "              'wdNetherlands': 31,\n",
       "              'wdNorway': 47,\n",
       "              'wdPeru': 51,\n",
       "              'wdSpain': 34,\n",
       "              'wdSweden': 46,\n",
       "              'wdTaiwan': 886,\n",
       "              'wdUK': 44,\n",
       "              'wdUS': 1,\n",
       "              'wdVenezuela': 58,\n",
       "              'wdCursorMovementLogical': 0,\n",
       "              'wdCursorMovementVisual': 1,\n",
       "              'wdCursorIBeam': 1,\n",
       "              'wdCursorNormal': 2,\n",
       "              'wdCursorNorthwestArrow': 3,\n",
       "              'wdCursorWait': 0,\n",
       "              'wdCustomLabelA4': 2,\n",
       "              'wdCustomLabelA4LS': 3,\n",
       "              'wdCustomLabelA5': 4,\n",
       "              'wdCustomLabelA5LS': 5,\n",
       "              'wdCustomLabelB4JIS': 13,\n",
       "              'wdCustomLabelB5': 6,\n",
       "              'wdCustomLabelFanfold': 8,\n",
       "              'wdCustomLabelHigaki': 11,\n",
       "              'wdCustomLabelHigakiLS': 12,\n",
       "              'wdCustomLabelLetter': 0,\n",
       "              'wdCustomLabelLetterLS': 1,\n",
       "              'wdCustomLabelMini': 7,\n",
       "              'wdCustomLabelVertHalfSheet': 9,\n",
       "              'wdCustomLabelVertHalfSheetLS': 10,\n",
       "              'wdDateLanguageBidi': 10,\n",
       "              'wdDateLanguageLatin': 1033,\n",
       "              'wdAutoRecoverPath': 5,\n",
       "              'wdBorderArtPath': 19,\n",
       "              'wdCurrentFolderPath': 14,\n",
       "              'wdDocumentsPath': 0,\n",
       "              'wdGraphicsFiltersPath': 10,\n",
       "              'wdPicturesPath': 1,\n",
       "              'wdProgramPath': 9,\n",
       "              'wdProofingToolsPath': 12,\n",
       "              'wdStartupPath': 8,\n",
       "              'wdStyleGalleryPath': 15,\n",
       "              'wdTempFilePath': 13,\n",
       "              'wdTextConvertersPath': 11,\n",
       "              'wdToolsPath': 6,\n",
       "              'wdTutorialPath': 7,\n",
       "              'wdUserOptionsPath': 4,\n",
       "              'wdUserTemplatesPath': 2,\n",
       "              'wdWorkgroupTemplatesPath': 3,\n",
       "              'wdWord10ListBehavior': 2,\n",
       "              'wdWord8ListBehavior': 0,\n",
       "              'wdWord9ListBehavior': 1,\n",
       "              'wdWord8TableBehavior': 0,\n",
       "              'wdWord9TableBehavior': 1,\n",
       "              'wdDeleteCellsEntireColumn': 3,\n",
       "              'wdDeleteCellsEntireRow': 2,\n",
       "              'wdDeleteCellsShiftLeft': 0,\n",
       "              'wdDeleteCellsShiftUp': 1,\n",
       "              'wdDeletedTextMarkBold': 5,\n",
       "              'wdDeletedTextMarkCaret': 2,\n",
       "              'wdDeletedTextMarkColorOnly': 9,\n",
       "              'wdDeletedTextMarkDoubleStrikeThrough': 10,\n",
       "              'wdDeletedTextMarkDoubleUnderline': 8,\n",
       "              'wdDeletedTextMarkHidden': 0,\n",
       "              'wdDeletedTextMarkItalic': 6,\n",
       "              'wdDeletedTextMarkNone': 4,\n",
       "              'wdDeletedTextMarkPound': 3,\n",
       "              'wdDeletedTextMarkStrikeThrough': 1,\n",
       "              'wdDeletedTextMarkUnderline': 7,\n",
       "              'wdDiacriticColorBidi': 0,\n",
       "              'wdDiacriticColorLatin': 1,\n",
       "              'wdGrammar': 1,\n",
       "              'wdHangulHanjaConversion': 8,\n",
       "              'wdHangulHanjaConversionCustom': 9,\n",
       "              'wdHyphenation': 3,\n",
       "              'wdSpelling': 0,\n",
       "              'wdSpellingComplete': 4,\n",
       "              'wdSpellingCustom': 5,\n",
       "              'wdSpellingLegal': 6,\n",
       "              'wdSpellingMedical': 7,\n",
       "              'wdThesaurus': 2,\n",
       "              'wd70': 0,\n",
       "              'wd70FE': 1,\n",
       "              'wd80': 2,\n",
       "              'wdInsertContent': 0,\n",
       "              'wdInsertPage': 2,\n",
       "              'wdInsertParagraph': 1,\n",
       "              'wdLeftToRight': 0,\n",
       "              'wdRightToLeft': 1,\n",
       "              'wdDocumentEmail': 2,\n",
       "              'wdDocumentLetter': 1,\n",
       "              'wdDocumentNotSpecified': 0,\n",
       "              'wdDocument': 1,\n",
       "              'wdEmailMessage': 0,\n",
       "              'wdWebPage': 2,\n",
       "              'wdTypeDocument': 0,\n",
       "              'wdTypeFrameset': 2,\n",
       "              'wdTypeTemplate': 1,\n",
       "              'wdDocumentViewLtr': 1,\n",
       "              'wdDocumentViewRtl': 0,\n",
       "              'wdDropMargin': 2,\n",
       "              'wdDropNone': 0,\n",
       "              'wdDropNormal': 1,\n",
       "              'wdAutomaticUpdate': 3,\n",
       "              'wdCancelPublisher': 0,\n",
       "              'wdChangeAttributes': 5,\n",
       "              'wdManualUpdate': 4,\n",
       "              'wdOpenSource': 7,\n",
       "              'wdSelectPublisher': 2,\n",
       "              'wdSendPublisher': 1,\n",
       "              'wdUpdateSubscriber': 6,\n",
       "              'wdPublisher': 0,\n",
       "              'wdSubscriber': 1,\n",
       "              'wdEditorCurrent': -6,\n",
       "              'wdEditorEditors': -5,\n",
       "              'wdEditorEveryone': -1,\n",
       "              'wdEditorOwners': -4,\n",
       "              'wdEmailHTMLFidelityHigh': 3,\n",
       "              'wdEmailHTMLFidelityLow': 1,\n",
       "              'wdEmailHTMLFidelityMedium': 2,\n",
       "              'wdEmphasisMarkNone': 0,\n",
       "              'wdEmphasisMarkOverComma': 2,\n",
       "              'wdEmphasisMarkOverSolidCircle': 1,\n",
       "              'wdEmphasisMarkOverWhiteCircle': 3,\n",
       "              'wdEmphasisMarkUnderSolidCircle': 4,\n",
       "              'wdCancelDisabled': 0,\n",
       "              'wdCancelInterrupt': 1,\n",
       "              'wdEncloseStyleLarge': 2,\n",
       "              'wdEncloseStyleNone': 0,\n",
       "              'wdEncloseStyleSmall': 1,\n",
       "              'wdEnclosureCircle': 0,\n",
       "              'wdEnclosureDiamond': 3,\n",
       "              'wdEnclosureSquare': 1,\n",
       "              'wdEnclosureTriangle': 2,\n",
       "              'wdEndOfDocument': 1,\n",
       "              'wdEndOfSection': 0,\n",
       "              'wdCenterClockwise': 7,\n",
       "              'wdCenterLandscape': 4,\n",
       "              'wdCenterPortrait': 1,\n",
       "              'wdLeftClockwise': 6,\n",
       "              'wdLeftLandscape': 3,\n",
       "              'wdLeftPortrait': 0,\n",
       "              'wdRightClockwise': 8,\n",
       "              'wdRightLandscape': 5,\n",
       "              'wdRightPortrait': 2,\n",
       "              'wdExportCreateHeadingBookmarks': 1,\n",
       "              'wdExportCreateNoBookmarks': 0,\n",
       "              'wdExportCreateWordBookmarks': 2,\n",
       "              'wdExportFormatPDF': 17,\n",
       "              'wdExportFormatXPS': 18,\n",
       "              'wdExportDocumentContent': 0,\n",
       "              'wdExportDocumentWithMarkup': 7,\n",
       "              'wdExportOptimizeForOnScreen': 1,\n",
       "              'wdExportOptimizeForPrint': 0,\n",
       "              'wdExportAllDocument': 0,\n",
       "              'wdExportCurrentPage': 2,\n",
       "              'wdExportFromTo': 3,\n",
       "              'wdExportSelection': 1,\n",
       "              'wdLineBreakJapanese': 1041,\n",
       "              'wdLineBreakKorean': 1042,\n",
       "              'wdLineBreakSimplifiedChinese': 2052,\n",
       "              'wdLineBreakTraditionalChinese': 1028,\n",
       "              'wdFarEastLineBreakLevelCustom': 2,\n",
       "              'wdFarEastLineBreakLevelNormal': 0,\n",
       "              'wdFarEastLineBreakLevelStrict': 1,\n",
       "              'wdFieldKindCold': 3,\n",
       "              'wdFieldKindHot': 1,\n",
       "              'wdFieldKindNone': 0,\n",
       "              'wdFieldKindWarm': 2,\n",
       "              'wdFieldShadingAlways': 1,\n",
       "              'wdFieldShadingNever': 0,\n",
       "              'wdFieldShadingWhenSelected': 2,\n",
       "              'wdFieldAddin': 81,\n",
       "              'wdFieldAddressBlock': 93,\n",
       "              'wdFieldAdvance': 84,\n",
       "              'wdFieldAsk': 38,\n",
       "              'wdFieldAuthor': 17,\n",
       "              'wdFieldAutoNum': 54,\n",
       "              'wdFieldAutoNumLegal': 53,\n",
       "              'wdFieldAutoNumOutline': 52,\n",
       "              'wdFieldAutoText': 79,\n",
       "              'wdFieldAutoTextList': 89,\n",
       "              'wdFieldBarCode': 63,\n",
       "              'wdFieldBibliography': 97,\n",
       "              'wdFieldBidiOutline': 92,\n",
       "              'wdFieldCitation': 96,\n",
       "              'wdFieldComments': 19,\n",
       "              'wdFieldCompare': 80,\n",
       "              'wdFieldCreateDate': 21,\n",
       "              'wdFieldDDE': 45,\n",
       "              'wdFieldDDEAuto': 46,\n",
       "              'wdFieldData': 40,\n",
       "              'wdFieldDatabase': 78,\n",
       "              'wdFieldDate': 31,\n",
       "              'wdFieldDisplayBarcode': 99,\n",
       "              'wdFieldDocProperty': 85,\n",
       "              'wdFieldDocVariable': 64,\n",
       "              'wdFieldEditTime': 25,\n",
       "              'wdFieldEmbed': 58,\n",
       "              'wdFieldEmpty': -1,\n",
       "              'wdFieldExpression': 34,\n",
       "              'wdFieldFileName': 29,\n",
       "              'wdFieldFileSize': 69,\n",
       "              'wdFieldFillIn': 39,\n",
       "              'wdFieldFootnoteRef': 5,\n",
       "              'wdFieldFormCheckBox': 71,\n",
       "              'wdFieldFormDropDown': 83,\n",
       "              'wdFieldFormTextInput': 70,\n",
       "              'wdFieldFormula': 49,\n",
       "              'wdFieldGlossary': 47,\n",
       "              'wdFieldGoToButton': 50,\n",
       "              'wdFieldGreetingLine': 94,\n",
       "              'wdFieldHTMLActiveX': 91,\n",
       "              'wdFieldHyperlink': 88,\n",
       "              'wdFieldIf': 7,\n",
       "              'wdFieldImport': 55,\n",
       "              'wdFieldInclude': 36,\n",
       "              'wdFieldIncludePicture': 67,\n",
       "              'wdFieldIncludeText': 68,\n",
       "              'wdFieldIndex': 8,\n",
       "              'wdFieldIndexEntry': 4,\n",
       "              'wdFieldInfo': 14,\n",
       "              'wdFieldKeyWord': 18,\n",
       "              'wdFieldLastSavedBy': 20,\n",
       "              'wdFieldLink': 56,\n",
       "              'wdFieldListNum': 90,\n",
       "              'wdFieldMacroButton': 51,\n",
       "              'wdFieldMergeBarcode': 98,\n",
       "              'wdFieldMergeField': 59,\n",
       "              'wdFieldMergeRec': 44,\n",
       "              'wdFieldMergeSeq': 75,\n",
       "              'wdFieldNext': 41,\n",
       "              'wdFieldNextIf': 42,\n",
       "              'wdFieldNoteRef': 72,\n",
       "              'wdFieldNumChars': 28,\n",
       "              'wdFieldNumPages': 26,\n",
       "              'wdFieldNumWords': 27,\n",
       "              'wdFieldOCX': 87,\n",
       "              'wdFieldPage': 33,\n",
       "              'wdFieldPageRef': 37,\n",
       "              'wdFieldPrint': 48,\n",
       "              'wdFieldPrintDate': 23,\n",
       "              'wdFieldPrivate': 77,\n",
       "              'wdFieldQuote': 35,\n",
       "              'wdFieldRef': 3,\n",
       "              'wdFieldRefDoc': 11,\n",
       "              'wdFieldRevisionNum': 24,\n",
       "              'wdFieldSaveDate': 22,\n",
       "              'wdFieldSection': 65,\n",
       "              'wdFieldSectionPages': 66,\n",
       "              'wdFieldSequence': 12,\n",
       "              'wdFieldSet': 6,\n",
       "              'wdFieldShape': 95,\n",
       "              'wdFieldSkipIf': 43,\n",
       "              'wdFieldStyleRef': 10,\n",
       "              'wdFieldSubject': 16,\n",
       "              'wdFieldSubscriber': 82,\n",
       "              'wdFieldSymbol': 57,\n",
       "              'wdFieldTOA': 73,\n",
       "              'wdFieldTOAEntry': 74,\n",
       "              'wdFieldTOC': 13,\n",
       "              'wdFieldTOCEntry': 9,\n",
       "              'wdFieldTemplate': 30,\n",
       "              'wdFieldTime': 32,\n",
       "              'wdFieldTitle': 15,\n",
       "              'wdFieldUserAddress': 62,\n",
       "              'wdFieldUserInitials': 61,\n",
       "              'wdFieldUserName': 60,\n",
       "              'wdMatchAnyCharacter': 65599,\n",
       "              'wdMatchAnyDigit': 65567,\n",
       "              'wdMatchAnyLetter': 65583,\n",
       "              'wdMatchCaretCharacter': 11,\n",
       "              'wdMatchColumnBreak': 14,\n",
       "              'wdMatchCommentMark': 5,\n",
       "              'wdMatchEmDash': 8212,\n",
       "              'wdMatchEnDash': 8211,\n",
       "              'wdMatchEndnoteMark': 65555,\n",
       "              'wdMatchField': 19,\n",
       "              'wdMatchFootnoteMark': 65554,\n",
       "              'wdMatchGraphic': 1,\n",
       "              'wdMatchManualLineBreak': 65551,\n",
       "              'wdMatchManualPageBreak': 65564,\n",
       "              'wdMatchNonbreakingHyphen': 30,\n",
       "              'wdMatchNonbreakingSpace': 160,\n",
       "              'wdMatchOptionalHyphen': 31,\n",
       "              'wdMatchParagraphMark': 65551,\n",
       "              'wdMatchSectionBreak': 65580,\n",
       "              'wdMatchTabCharacter': 9,\n",
       "              'wdMatchWhiteSpace': 65655,\n",
       "              'wdFindAsk': 2,\n",
       "              'wdFindContinue': 1,\n",
       "              'wdFindStop': 0,\n",
       "              'wdFlowLtr': 0,\n",
       "              'wdFlowRtl': 1,\n",
       "              'wdFontBiasDefault': 0,\n",
       "              'wdFontBiasDontCare': 255,\n",
       "              'wdFontBiasFareast': 1,\n",
       "              'wdBeneathText': 1,\n",
       "              'wdBottomOfPage': 0,\n",
       "              'wdFrameBottom': -999997,\n",
       "              'wdFrameCenter': -999995,\n",
       "              'wdFrameInside': -999994,\n",
       "              'wdFrameLeft': -999998,\n",
       "              'wdFrameOutside': -999993,\n",
       "              'wdFrameRight': -999996,\n",
       "              'wdFrameTop': -999999,\n",
       "              'wdFrameAtLeast': 1,\n",
       "              'wdFrameAuto': 0,\n",
       "              'wdFrameExact': 2,\n",
       "              'wdFramesetNewFrameAbove': 0,\n",
       "              'wdFramesetNewFrameBelow': 1,\n",
       "              'wdFramesetNewFrameLeft': 3,\n",
       "              'wdFramesetNewFrameRight': 2,\n",
       "              'wdFramesetSizeTypeFixed': 1,\n",
       "              'wdFramesetSizeTypePercent': 0,\n",
       "              'wdFramesetSizeTypeRelative': 2,\n",
       "              'wdFramesetTypeFrame': 1,\n",
       "              'wdFramesetTypeFrameset': 0,\n",
       "              'wdFrenchBoth': 0,\n",
       "              'wdFrenchPostReform': 2,\n",
       "              'wdFrenchPreReform': 1,\n",
       "              'wdGoToAbsolute': 1,\n",
       "              'wdGoToFirst': 1,\n",
       "              'wdGoToLast': -1,\n",
       "              'wdGoToNext': 2,\n",
       "              'wdGoToPrevious': 3,\n",
       "              'wdGoToRelative': 2,\n",
       "              'wdGoToBookmark': -1,\n",
       "              'wdGoToComment': 6,\n",
       "              'wdGoToEndnote': 5,\n",
       "              'wdGoToEquation': 10,\n",
       "              'wdGoToField': 7,\n",
       "              'wdGoToFootnote': 4,\n",
       "              'wdGoToGrammaticalError': 14,\n",
       "              'wdGoToGraphic': 8,\n",
       "              'wdGoToHeading': 11,\n",
       "              'wdGoToLine': 3,\n",
       "              'wdGoToObject': 9,\n",
       "              'wdGoToPage': 1,\n",
       "              'wdGoToPercent': 12,\n",
       "              'wdGoToProofreadingError': 15,\n",
       "              'wdGoToSection': 0,\n",
       "              'wdGoToSpellingError': 13,\n",
       "              'wdGoToTable': 2,\n",
       "              'wdGranularityCharLevel': 0,\n",
       "              'wdGranularityWordLevel': 1,\n",
       "              'wdGutterPosLeft': 0,\n",
       "              'wdGutterPosRight': 2,\n",
       "              'wdGutterPosTop': 1,\n",
       "              'wdGutterStyleBidi': 2,\n",
       "              'wdGutterStyleLatin': -10,\n",
       "              'wdHeaderFooterEvenPages': 3,\n",
       "              'wdHeaderFooterFirstPage': 2,\n",
       "              'wdHeaderFooterPrimary': 1,\n",
       "              'wdHeadingSeparatorBlankLine': 1,\n",
       "              'wdHeadingSeparatorLetter': 2,\n",
       "              'wdHeadingSeparatorLetterFull': 4,\n",
       "              'wdHeadingSeparatorLetterLow': 3,\n",
       "              'wdHeadingSeparatorNone': 0,\n",
       "              'wdFullScript': 0,\n",
       "              'wdMixedAuthorizedScript': 3,\n",
       "              'wdMixedScript': 2,\n",
       "              'wdPartialScript': 1,\n",
       "              'wdHelp': 0,\n",
       "              'wdHelpAbout': 1,\n",
       "              'wdHelpActiveWindow': 2,\n",
       "              'wdHelpContents': 3,\n",
       "              'wdHelpExamplesAndDemos': 4,\n",
       "              'wdHelpHWP': 13,\n",
       "              'wdHelpIchitaro': 11,\n",
       "              'wdHelpIndex': 5,\n",
       "              'wdHelpKeyboard': 6,\n",
       "              'wdHelpPE2': 12,\n",
       "              'wdHelpPSSHelp': 7,\n",
       "              'wdHelpQuickPreview': 8,\n",
       "              'wdHelpSearch': 9,\n",
       "              'wdHelpUsingHelp': 10,\n",
       "              'wdAutoDetectHighAnsiFarEast': 2,\n",
       "              'wdHighAnsiIsFarEast': 0,\n",
       "              'wdHighAnsiIsHighAnsi': 1,\n",
       "              'wdHorizontalInVerticalFitInLine': 1,\n",
       "              'wdHorizontalInVerticalNone': 0,\n",
       "              'wdHorizontalInVerticalResizeLine': 2,\n",
       "              'wdHorizontalLineAlignCenter': 1,\n",
       "              'wdHorizontalLineAlignLeft': 0,\n",
       "              'wdHorizontalLineAlignRight': 2,\n",
       "              'wdHorizontalLineFixedWidth': -2,\n",
       "              'wdHorizontalLinePercentWidth': -1,\n",
       "              'wdIMEModeAlpha': 8,\n",
       "              'wdIMEModeAlphaFull': 7,\n",
       "              'wdIMEModeHangul': 10,\n",
       "              'wdIMEModeHangulFull': 9,\n",
       "              'wdIMEModeHiragana': 4,\n",
       "              'wdIMEModeKatakana': 5,\n",
       "              'wdIMEModeKatakanaHalf': 6,\n",
       "              'wdIMEModeNoControl': 0,\n",
       "              'wdIMEModeOff': 2,\n",
       "              'wdIMEModeOn': 1,\n",
       "              'wdIndexFilterAiueo': 1,\n",
       "              'wdIndexFilterAkasatana': 2,\n",
       "              'wdIndexFilterChosung': 3,\n",
       "              'wdIndexFilterFull': 6,\n",
       "              'wdIndexFilterLow': 4,\n",
       "              'wdIndexFilterMedium': 5,\n",
       "              'wdIndexFilterNone': 0,\n",
       "              'wdIndexBulleted': 4,\n",
       "              'wdIndexClassic': 1,\n",
       "              'wdIndexFancy': 2,\n",
       "              'wdIndexFormal': 5,\n",
       "              'wdIndexModern': 3,\n",
       "              'wdIndexSimple': 6,\n",
       "              'wdIndexTemplate': 0,\n",
       "              ...})"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "WordApp = win32.gencache.EnsureDispatch('Word.Application')\n",
    "\n",
    "# get a specific constant.\n",
    "display(c.wdAlertsAll)\n",
    "\n",
    "# let's access the word constant dictionary. This is the second one in our list.\n",
    "display(c.__dicts__[1])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
